﻿using Sirenix.OdinInspector;

namespace YooAsset.Editor.AssetBundleOdinEditor
{
    public static class EnumUtility
    {
        public static PackRule GetPackRule(string name)
        {
            switch (name)
            {
                case "PackSeparately":
                    return PackRule.PackSeparately;
                case "PackDirectory":
                    return PackRule.PackDirectory;
                case "PackCollector":
                    return PackRule.PackCollector;
                case "PackGrouper":
                    return PackRule.PackGrouper;
                case "PackRawFile":
                    return PackRule.PackRawFile;
            }

            return PackRule.PackSeparately;
        }

        public static FilterRule GetFilterRule(string name)
        {
            switch (@name)
            {
                case "CollectAll":
                    return FilterRule.CollectAll;
                case "CollectScene":
                    return FilterRule.CollectScene;
                case "CollectPrefab":
                    return FilterRule.CollectPrefab;
                case "CollectSprite":
                    return FilterRule.CollectSprite;
            }

            return FilterRule.CollectAll;
        }
    }

    public enum PackRule
    {
        PackSeparately,
        PackDirectory,
        PackCollector,
        PackGrouper,
        PackRawFile
    }


    public enum FilterRule
    {
        CollectAll,
        CollectScene,
        CollectPrefab,
        CollectSprite,
    }
}